-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to fail on unknown keys. #506
Conversation
As a draft, config, and naming to discuss. I'm tempted to make it strict by default, and have the option to ignore if ever there are extra keys added. Closes pypa#505
I'd certainly be OK with having the strict option by default, and I think I'd go one step further and not make an option at all. I just remembered we already have an environment variable |
Ok, let me see. I want to test if the FLIT_ALLOW_INVALID pass the |
That's a good point. But I think a value in the pyproject.toml is perhaps not ideal, because that's controlled by the maintainers of the package, not by the people who might be trying to build it. Of course, the people downstream could patch |
I agree, I just don't see a reason to set/unset it outside of (I actually don't see a reason to unset failing on non-existing key at all unless there are new keys and an old versions of flit...). |
I can confirm that it will work. :) I use the same mechanism (environment variable) in another build backend: https://github.com/pradyunsg/sphinx-theme-builder/blob/97bd61c3a441341cd33c5af11c3264226c297b9e/src/sphinx_theme_builder/_internal/nodejs.py#L99 |
Thanks @pradyunsg . 🙂 I'm also OK with just erroring on unknown keys with no escape hatch - I think the PEP 621 support is new enough that we can probably get away with this, and we can always add an escape hatch if it turns out to be an issue. If we do want an escape hatch, the environment variable is my preference. |
It appears that at least one package has made it to PyPI with a misspelled key - This is probably a prompt to get this fixed quickly. But maybe also that we do need some kind of escape hatch to let such packages be built. 😕 |
Well at the same time if it’s misspelled it’s build will be incorrect.
…On Mon, Jan 10, 2022 at 7:19 PM Thomas Kluyver ***@***.***> wrote:
It appears that at least one package has made it to PyPI with a misspelled
key - pandas_dataframe_convert==0.2 has dependancies instead of
dependencies.
This is probably a prompt to get this fixed quickly. But maybe also that
we do need some kind of escape hatch to let such packages be built. 😕
—
Reply to this email directly, view it on GitHub
<#506 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACR5TY4624GSWTMCHCRHFDUVMPJHANCNFSM5LO2AP6A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Technically incorrect but still largely working. Given what it is, I'd guess a lot of users have It was only up for a matter of hours before a new release corrected the issue, so in this case we'll probably get away with breaking the older release. But it does show that real people are hitting the issue and managing to upload packages to PyPI. |
The best kind of incorrect. |
My current thinking is that we'll make unknown |
As a draft, config, and naming to discuss.
I'm tempted to make it strict by default, and have the option to ignore
if ever there are extra keys added.
Closes #505